package cn.smile.bean.form.basic.voucher;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

@Data
public class AddVoucherForm {
    /**
     * 代金券名称
     */
    @NotBlank(message = "请输入代金券名称")
    private String voucherName;

    /**
     * 代金券金额
     */
    @NotNull(message = "请输入代金券金额")
    private BigDecimal voucherAmount;

    /**
     * 有效期-开始
     */
    @NotNull(message = "请选择代金券生效时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate validityStart;

    /**
     * 有效期-结束
     */
    @NotNull(message = "请选择代金券到期时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate validityEnd;

    /**
     * 可用范围消费单ID集合
     */
    private List<String> itemList;
}
